package com.example.back.controller;

import com.example.back.bean.PayOrderDetails;
import com.example.back.dao.PayOrderDetailsDao;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
@Api(tags = "订单信息接口")
@RestController
public class OrderInfoController {

    @Autowired
    private PayOrderDetailsDao payOrderDetailsDao;

    @ApiOperation(value = "获取支付成功的订单信息",httpMethod = "GET")
    @RequestMapping("/paySuccessOrderInfo")
    public List<PayOrderDetails> paySuccessOrderInfo(){
        return payOrderDetailsDao.selectSuccessPayOrderDetails();
    }

    @ApiOperation(value = "获取已经取消的订单信息",httpMethod = "GET")
    @RequestMapping("/payCancelOrderInfo")
    public List<PayOrderDetails> payCancelOrderInfo(){
        return payOrderDetailsDao.selectCancelPayOrderDetails();
    }
}
